/*
 * Copyright 2019 Zhang XueHai
 * you may not use this file except in compliance with the License.
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.zhangxuehai.android.pdfviewer.annotation.eraser;

import android.graphics.Canvas;
import androidx.annotation.Nullable;
import com.zhangxuehai.android.pdfviewer.PDFView;
import com.zhangxuehai.android.pdfviewer.annotation.BaseAnnotation;
import java.util.List;

/**
 * 橡皮擦接口
 * @author 章学海
 * @date 2019/12/26
 */
public interface Eraser {
    /**
     * 移动橡皮
     * @param x 基于pdf坐标的x
     * @param y 基于pdf坐标的y
     * */
    void move(int x, int y);

    /**绘制橡皮擦
     * @param canvas 画布，大小为display坐标中pdf页面的大小，
     * @param scale pdf坐标页面大小于display坐标页面大小比例
     * @param viewZoom {{@link PDFView#getZoom()}}*/
    void draw(Canvas canvas , float scale , float viewZoom);
    /**
     * @param  annotations 当前页的注释
     * @param scale pdf坐标页面大小于display坐标页面大小比例
     * @return 需要擦除的注释
     * @param viewZoom {{@link PDFView#getZoom()}}*/
    BaseAnnotation erase(@Nullable List<BaseAnnotation> annotations, float scale , float viewZoom, PDFView pdfView);
}
